package com.example.mypassword.controller;

import com.example.mypassword.bean.Result;
import com.example.mypassword.bean.vo.user.UserVO;
import com.example.mypassword.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @description: 用户信息
 * @author: fengfazheng
 * @create: 2021-12-26 18:23
 **/
@RestController
@RequestMapping("/user")
@Api(value = "/user", tags = "用户")
public class UserController {
    @Resource
    public UserService userService;

    @PostMapping("/create")
    @ApiOperation(value = "新增用户", httpMethod = "POST", notes = "新增用户")
    public Result create(@RequestBody UserVO userVO) {
        userService.createUser(userVO);
        return Result.resultOk();
    }
}
